package club.xshiwu.springcloud.service;

import club.xshiwu.springcloud.pojo.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 库存微服务
 * Created by Intellij IDEA.
 * Date:  2020/6/12
 * @author xsw
 */
@FeignClient(value = "seata-storage-service")
public interface StorageService {
    /**
     *
     * @param productId 产品id
     * @param count 产品数量
     * @return 产品减少数
     */
    @PostMapping("/storage/decrease")
    CommonResult decrease(@RequestParam("productId") Long productId,@RequestParam("count") Integer count);
}
